3.178 \(\int \frac{(g \sec (e+f x))^{3/2} \sqrt{a+a \sec (e+f x)}}{c-c \sec (e+f x)} \, dx\)

Optimal. Leaf size=104 \[ \frac{2 g \cot (e+f x) \sqrt{a \sec (e+f x)+a} \sqrt{g \sec (e+f x)}}{c f}-\frac{2 \sqrt{a} g^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a} \sqrt{g \sec (e+f x)}}\right )}{c f} \]

[Out]

(-2*Sqrt[a]*g^(3/2)*ArcTanh[(Sqrt[a]*Sqrt[g]*Tan[e + f*x])/(Sqrt[g*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]])])/(
c*f) + (2*g*Cot[e + f*x]*Sqrt[g*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]])/(c*f)

________________________________________________________________________________________

Rubi [A]  time = 0.278111, antiderivative size = 143, normalized size of antiderivative = 1.38, number of steps used = 5, number of rules used = 5, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3964, 47, 63, 217, 203} \[ \frac{2 a g^{3/2} \tan (e+f x) \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{g \sec (e+f x)}}{\sqrt{g} \sqrt{c-c \sec (e+f x)}}\right )}{\sqrt{c} f \sqrt{a \sec (e+f x)+a} \sqrt{c-c \sec (e+f x)}}-\frac{2 a g \tan (e+f x) \sqrt{g \sec (e+f x)}}{f \sqrt{a \sec (e+f x)+a} (c-c \sec (e+f x))} \]

Antiderivative was successfully verified.

[In]

Int[((g*Sec[e + f*x])^(3/2)*Sqrt[a + a*Sec[e + f*x]])/(c - c*Sec[e + f*x]),x]

[Out]

(-2*a*g*Sqrt[g*Sec[e + f*x]]*Tan[e + f*x])/(f*Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])) + (2*a*g^(3/2)*Ar
cTan[(Sqrt[c]*Sqrt[g*Sec[e + f*x]])/(Sqrt[g]*Sqrt[c - c*Sec[e + f*x]])]*Tan[e + f*x])/(Sqrt[c]*f*Sqrt[a + a*Se
c[e + f*x]]*Sqrt[c - c*Sec[e + f*x]])

Rule 3964

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a*c*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[c + d*Csc[e + f*x
]]), Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^(n - 1/2), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b,
 c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + 1)), x] - Dist[(d*n)/(b*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d},
x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && LtQ[m, -1] &&  !(IntegerQ[n] &&  !IntegerQ[m]) &&  !(ILeQ[m + n + 2, 0
] && (FractionQ[m] || GeQ[2*n + m + 1, 0])) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(g \sec (e+f x))^{3/2} \sqrt{a+a \sec (e+f x)}}{c-c \sec (e+f x)} \, dx &=-\frac{(a c g \tan (e+f x)) \operatorname{Subst}\left (\int \frac{\sqrt{g x}}{(c-c x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{2 a g \sqrt{g \sec (e+f x)} \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac{\left (a g^2 \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{g x} \sqrt{c-c x}} \, dx,x,\sec (e+f x)\right )}{f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{2 a g \sqrt{g \sec (e+f x)} \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac{(2 a g \tan (e+f x)) \operatorname{Subst}\left (\int \frac{1}{\sqrt{c-\frac{c x^2}{g}}} \, dx,x,\sqrt{g \sec (e+f x)}\right )}{f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{2 a g \sqrt{g \sec (e+f x)} \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac{(2 a g \tan (e+f x)) \operatorname{Subst}\left (\int \frac{1}{1+\frac{c x^2}{g}} \, dx,x,\frac{\sqrt{g \sec (e+f x)}}{\sqrt{c-c \sec (e+f x)}}\right )}{f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ &=-\frac{2 a g \sqrt{g \sec (e+f x)} \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac{2 a g^{3/2} \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{g \sec (e+f x)}}{\sqrt{g} \sqrt{c-c \sec (e+f x)}}\right ) \tan (e+f x)}{\sqrt{c} f \sqrt{a+a \sec (e+f x)} \sqrt{c-c \sec (e+f x)}}\\ \end{align*}

Mathematica [A]  time = 1.53321, size = 162, normalized size = 1.56 \[ \frac{2 \cot \left (\frac{1}{2} (e+f x)\right ) \sqrt{a (\sec (e+f x)+1)} (g \sec (e+f x))^{3/2} \left (\sqrt{\sec (e+f x)} \sqrt{\sec (e+f x)+1}+\sqrt{\tan ^2(e+f x)} \left (\log (\sec (e+f x)+1)-\log \left (\sec ^{\frac{3}{2}}(e+f x)+\sqrt{\sec (e+f x)}+\sqrt{\tan ^2(e+f x)} \sqrt{\sec (e+f x)+1}\right )\right )\right )}{c f \sec ^{\frac{3}{2}}(e+f x) (\sec (e+f x)+1)^{3/2}} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[((g*Sec[e + f*x])^(3/2)*Sqrt[a + a*Sec[e + f*x]])/(c - c*Sec[e + f*x]),x]

[Out]

(2*Cot[(e + f*x)/2]*(g*Sec[e + f*x])^(3/2)*Sqrt[a*(1 + Sec[e + f*x])]*(Sqrt[Sec[e + f*x]]*Sqrt[1 + Sec[e + f*x
]] + (Log[1 + Sec[e + f*x]] - Log[Sqrt[Sec[e + f*x]] + Sec[e + f*x]^(3/2) + Sqrt[1 + Sec[e + f*x]]*Sqrt[Tan[e
+ f*x]^2]])*Sqrt[Tan[e + f*x]^2]))/(c*f*Sec[e + f*x]^(3/2)*(1 + Sec[e + f*x])^(3/2))

________________________________________________________________________________________

Maple [B]  time = 0.342, size = 234, normalized size = 2.3 \begin{align*}{\frac{ \left ( -1+\cos \left ( fx+e \right ) \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{2}}{fc \left ( \sin \left ( fx+e \right ) \right ) ^{4}} \left ( \cos \left ( fx+e \right ){\it Artanh} \left ({\frac{\cos \left ( fx+e \right ) +1-\sin \left ( fx+e \right ) }{2}\sqrt{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1}}} \right ) -\cos \left ( fx+e \right ){\it Artanh} \left ({\frac{\cos \left ( fx+e \right ) +1+\sin \left ( fx+e \right ) }{2}\sqrt{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1}}} \right ) -2\,\sin \left ( fx+e \right ) \sqrt{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1}}-{\it Artanh} \left ({\frac{\cos \left ( fx+e \right ) +1-\sin \left ( fx+e \right ) }{2}\sqrt{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1}}} \right ) +{\it Artanh} \left ({\frac{\cos \left ( fx+e \right ) +1+\sin \left ( fx+e \right ) }{2}\sqrt{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1}}} \right ) \right ) \sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ({\frac{g}{\cos \left ( fx+e \right ) }} \right ) ^{{\frac{3}{2}}} \left ( \left ( 1+\cos \left ( fx+e \right ) \right ) ^{-1} \right ) ^{-{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*sec(f*x+e))^(3/2)*(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e)),x)

[Out]

1/c/f*(cos(f*x+e)*arctanh(1/2*(1/(1+cos(f*x+e)))^(1/2)*(cos(f*x+e)+1-sin(f*x+e)))-cos(f*x+e)*arctanh(1/2*(1/(1
+cos(f*x+e)))^(1/2)*(cos(f*x+e)+1+sin(f*x+e)))-2*sin(f*x+e)*(1/(1+cos(f*x+e)))^(1/2)-arctanh(1/2*(1/(1+cos(f*x
+e)))^(1/2)*(cos(f*x+e)+1-sin(f*x+e)))+arctanh(1/2*(1/(1+cos(f*x+e)))^(1/2)*(cos(f*x+e)+1+sin(f*x+e))))*(1/cos
(f*x+e)*a*(1+cos(f*x+e)))^(1/2)*(-1+cos(f*x+e))*cos(f*x+e)^2*(g/cos(f*x+e))^(3/2)/(1/(1+cos(f*x+e)))^(3/2)/sin
(f*x+e)^4

________________________________________________________________________________________

Maxima [B]  time = 2.06821, size = 1322, normalized size = 12.71 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^(3/2)*(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e)),x, algorithm="maxima")

[Out]

1/2*(4*sqrt(2)*g*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*
f*x + 2*e))) - 4*sqrt(2)*g*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))*sin(1/4*arctan2(sin(2*f*x + 2*
e), cos(2*f*x + 2*e))) + 4*sqrt(2)*g*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - (g*cos(1/2*arctan2
(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + g*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*g*cos(1
/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + g)*log(2*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))
)^2 + 2*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + 2*sqrt(2)*cos(1/4*arctan2(sin(2*f*x + 2*e), c
os(2*f*x + 2*e))) + 2*sqrt(2)*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 2) + (g*cos(1/2*arctan2(s
in(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + g*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*g*cos(1/2
*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + g)*log(2*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^
2 + 2*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + 2*sqrt(2)*cos(1/4*arctan2(sin(2*f*x + 2*e), cos
(2*f*x + 2*e))) - 2*sqrt(2)*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 2) - (g*cos(1/2*arctan2(sin
(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + g*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*g*cos(1/2*a
rctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + g)*log(2*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2
+ 2*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*sqrt(2)*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2
*f*x + 2*e))) + 2*sqrt(2)*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 2) + (g*cos(1/2*arctan2(sin(2
*f*x + 2*e), cos(2*f*x + 2*e)))^2 + g*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*g*cos(1/2*arc
tan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + g)*log(2*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 +
2*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2*sqrt(2)*cos(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f
*x + 2*e))) - 2*sqrt(2)*sin(1/4*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 2))*sqrt(a)*sqrt(g)/((c*cos(1/2
*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 + c*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)))^2 - 2
*c*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + c)*f)

________________________________________________________________________________________

Fricas [A]  time = 0.80428, size = 855, normalized size = 8.22 \begin{align*} \left [\frac{\sqrt{a g} g \log \left (\frac{a g \cos \left (f x + e\right )^{3} - 7 \, a g \cos \left (f x + e\right )^{2} + 4 \, \sqrt{a g}{\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right )\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{\frac{g}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) + 8 \, a g}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2}}\right ) \sin \left (f x + e\right ) + 4 \, g \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{\frac{g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{2 \, c f \sin \left (f x + e\right )}, -\frac{\sqrt{-a g} g \arctan \left (\frac{2 \, \sqrt{-a g} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{\frac{g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{a g \cos \left (f x + e\right )^{2} - a g \cos \left (f x + e\right ) - 2 \, a g}\right ) \sin \left (f x + e\right ) - 2 \, g \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{\frac{g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{c f \sin \left (f x + e\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^(3/2)*(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e)),x, algorithm="fricas")

[Out]

[1/2*(sqrt(a*g)*g*log((a*g*cos(f*x + e)^3 - 7*a*g*cos(f*x + e)^2 + 4*sqrt(a*g)*(cos(f*x + e)^2 - 2*cos(f*x + e
))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(g/cos(f*x + e))*sin(f*x + e) + 8*a*g)/(cos(f*x + e)^3 + cos(f*
x + e)^2))*sin(f*x + e) + 4*g*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(g/cos(f*x + e))*cos(f*x + e))/(c*f*
sin(f*x + e)), -(sqrt(-a*g)*g*arctan(2*sqrt(-a*g)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt(g/cos(f*x + e))
*cos(f*x + e)*sin(f*x + e)/(a*g*cos(f*x + e)^2 - a*g*cos(f*x + e) - 2*a*g))*sin(f*x + e) - 2*g*sqrt((a*cos(f*x
 + e) + a)/cos(f*x + e))*sqrt(g/cos(f*x + e))*cos(f*x + e))/(c*f*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))**(3/2)*(a+a*sec(f*x+e))**(1/2)/(c-c*sec(f*x+e)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^(3/2)*(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e)),x, algorithm="giac")

[Out]

Timed out